<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>图书管理</title>
<script src="/public/js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
   function delbook(id){
	  $.get("__URL__/bookdel",{id:id},
		function(data){
			if(data){
			  $("tr#"+id+"").hide();
			  alert("删除成功！");	
			}  
		}
	  );	
	}
</script>
</head>

<body>
--------图书管理----------- </br>
<form method='post' action="__URL__/bookadd">
图书名称： <input name="Book_Name" type="text" /> </br>
ISBN: <input name="Book_Isbn" type="text" /> </br>
数量: <input name="Book_Number" type="text" value="1" /></br>
<input type="submit" value="添加" /> <input name="cancel" type="reset" value="取消" />
</form>



<!--图书列表-->
<table width="80%" border="1">
  <tr>
    <td>书名</td>
    <td>ISBN</td>
    <td>库存数量</td>
    <td>操作</td>
  </tr>
  <volist name="data" id="vo">
  <tr id="{$vo.Book_Id}">
    <td>{$vo.Book_Name}</td>
    <td>{$vo.Book_Isbn}</td>
    <td>{$vo.Book_Number}</td>
    <td><input name="edit" type="button" value="修改" />  <input id="delbook" name="delbook" type="button" value="删除" onclick="delbook({$vo.Book_Id})" /></td>
  </tr>
  </volist>
</table>
</body>
</html>
